<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>XinPeng</title>
	</head>
	<body>
		<script>
			
			class XinPeng {
				#start_time = new Date()
				constructor(end_time,xp_time) {
				    this.xp_time = xp_time
				    this.end_time = end_time
					this.disparity = ''
				}
				get_XinPeng_time(){
					let end_time = new Date(this.end_time).getTime()
					let start_time = this.#start_time.getTime()
					this.disparity = end_time - start_time
					if(this.disparity>0){
						let peng_for_time =Math.floor(this.disparity / 1000/this.xp_time) +'鹏';
						return peng_for_time;
					}else{
						return "今天的鹏已经用完，请明天再来！"
					}
					
				}
			}
			let peng = 30
			let xp = new XinPeng('2020/5/15 17:30:00',peng)
			setInterval(function(){
				document.write(xp.get_XinPeng_time())
			},1000)
		</script>
	</body>
</html>
